home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / xjewel / logic.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  1.1 KB  |  70 lines

  1. /*
  2. **
  3. **    X11 Jewel By David Cooper and Jose Guterman 05/92
  4. **
  5. */
  6.  
  7. /* default colors */
  8. #define PIECE1_C "red"
  9. #define PIECE2_C "green"
  10. #define PIECE3_C "orange"
  11. #define PIECE4_C "blue"
  12. #define PIECE5_C "cyan"
  13. #define PIECE6_C "yellow"
  14. #define WILD_C "white"
  15. #define FLASH_C "gray"
  16. #define BACKGND_C "gray"
  17.  
  18.  
  19. /* The numbers for PIECE1 to PIECE6 should be consecutive */
  20. #define PIECE1 0
  21. #define PIECE2 1
  22. #define PIECE3 2
  23. #define PIECE4 3
  24. #define PIECE5 4
  25. #define PIECE6 5
  26.  
  27. #    define NUM_REAL_PIECES 6
  28.  
  29. #define WILD_PIECE 6
  30.  
  31. #define BACKGND1 7
  32. #define BACKGND2 8
  33. #define BACKGND3 9
  34. #define BACKGND4 10
  35.  
  36. #    define NUM_BACKGND    4
  37.  
  38. #define FLASH1 11
  39. #define FLASH2 12
  40. #define FLASH3 13
  41. #define FLASH4 14
  42.  
  43. #    define NUM_FLASH    4
  44. #define NUM_PIECES 15
  45.  
  46.  
  47. #define TEST_PIECE(x)  ( ((x)==PIECE1) || \
  48.                          ((x)==PIECE2) || \
  49.                          ((x)==PIECE3) || \
  50.                          ((x)==PIECE4) || \
  51.                          ((x)==PIECE5) || \
  52.                          ((x)==PIECE6) )
  53.     
  54.  
  55. #define AVG_BLOCKS_BETWEEN_JEWELS 27
  56.  
  57. struct rem_piece {
  58.     int x,y;
  59.     int piece;
  60.     };
  61.  
  62. extern void Redraw_Board();
  63. extern void Init_Logic();
  64. extern void Move_Right();
  65. extern void Move_Left();
  66. extern void Rotate();
  67. extern void Drop();
  68. extern void Logic_Timeout();
  69.  
  70.